package com.bcxj.apidriver.controller;

import com.bcxj.apidriver.service.DriverUserWorkStatusService;
import com.bcxj.internalcommon.dto.ResponseResult;
import com.bcxj.internalcommon.entity.DriverUserWorkStatus;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: DriverUserWorkStatusController
 * Package: com.bcxj.apidriver.controller
 * Description:
 *
 * @Author BCXJ
 * @Create 2024/11/17 16:16
 * @Version 1.0
 * @Since 1.0
 */
@RestController
public class DriverUserWorkStatusController {

    @Autowired
    private DriverUserWorkStatusService driverUserWorkStatusService;


    /**
     * 修改司机的工作的状态
     * @param driverUserWorkStatus
     * @return
     */
    @PostMapping("/driver-user-work-status")
    public ResponseResult updateDriverWorkStatus(@RequestBody DriverUserWorkStatus driverUserWorkStatus) {
        return driverUserWorkStatusService.updateWorkStatus(driverUserWorkStatus.getDriverId(), driverUserWorkStatus.getWorkStatus());
    }
}
